//
//  KLSGBrifView.m
//  KaoLaShiGuangFM
//
//  Created by lanou3g on 15/10/30.
//  Copyright © 2015年 com.lanou3g. All rights reserved.
//

#import "KLSGBrifView.h"

@interface KLSGBrifView ()

@end

@implementation KLSGBrifView

-(instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self addSubviews];
    }
    return self;
}

- (void)addSubviews
{
    self.button = [UIButton buttonWithType:(UIButtonTypeCustom)];
    self.button.frame = CGRectMake(0, 0, kScreenWidth, kScreenHeight / 4);
    self.button.backgroundColor = [UIColor blackColor];
    [self addSubview:self.button];

    self.coverSmallImage = [[UIImageView alloc] initWithFrame:CGRectMake(20, self.frame.size.height / 4, kScreenWidth / 4, self.frame.size.height / 2)];
    self.coverSmallImage.backgroundColor = [UIColor redColor];
    [self.button addSubview:self.coverSmallImage];
    
    self.avatarPathImage = [[UIImageView alloc] initWithFrame:CGRectMake(CGRectGetMaxX(self.coverSmallImage.frame) + 20, 20, self.frame.size.width / 7, self.frame.size.width / 7)];
    self.avatarPathImage.layer.cornerRadius = self.avatarPathImage.layer.frame.size.width / 2;
    self.avatarPathImage.layer.masksToBounds = YES;
    self.avatarPathImage.backgroundColor = [UIColor yellowColor];
    [self.button addSubview:self.avatarPathImage];
    
    self.nicknameLable = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(self.avatarPathImage.frame) + 5, 30, kScreenWidth / 3, self.frame.size.height / 6)];
    self.nicknameLable.font = [UIFont systemFontOfSize:17];
//    self.nicknameLable.backgroundColor = [UIColor greenColor];
    self.nicknameLable.textColor = [UIColor whiteColor];
    [self.button addSubview:self.nicknameLable];
    
    self.introLable = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(self.coverSmallImage.frame) + 20, CGRectGetMaxY(self.avatarPathImage.frame) + 5, kScreenWidth / 1.7, self.frame.size.height / 7)];
    self.introLable.font = [UIFont systemFontOfSize:13];
//    self.introLable.backgroundColor = [UIColor greenColor];
    self.introLable.textColor = [UIColor whiteColor];
    [self.button addSubview:self.introLable];
    
    self.tagsLable = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(self.coverSmallImage.frame) + 20, CGRectGetMaxY(self.introLable.frame) + 5, kScreenWidth / 1.7, self.frame.size.height / 7)];
    self.tagsLable.font = [UIFont systemFontOfSize:13];
//    self.tagsLable.backgroundColor = [UIColor redColor];
    self.tagsLable.textColor = [UIColor whiteColor];
    self.tagsLable.numberOfLines = 0;
    [self.button addSubview:self.tagsLable];

    
}

@end
